﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/InternalPage.master"
  Inherits="MvcContrib.FluentHtml.ModelViewPage<StartQuizViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  Start a Quiz
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <form id="startQuizForm" action="<%= Url.Action("Start", "Quiz") %>" method="post">
  <div class="clearDiv entry-row">
    <%= this.Label(m => m.QuizName).Value("Quiz Name:") %>
    <%= this.TextBox(m => m.QuizName).Class("text").ValidateForRequired().Value(Model.QuizName)%>
  </div>
  <div class="clearDiv entry-row">
    <%= this.Label(m => m.Passphrase).Value("Quiz Passphrase:") %>
    <%= this.TextBox(m => m.Passphrase).Class("text").ValidateForRequired().Value(Model.Passphrase)%>
  </div>
  <div class="clearDiv entry-row">
    <%= this.Label(m => m.StartDate).Value("Start Date:") %>
    <%= this.TextBox(m => m.StartDate).Class("text").ValidateForRequired().Value((Model.StartDate > DateTime.MinValue ? Model.StartDate : DateTime.Today).ToString("MM/dd/yyyy"))%>
  </div>
  <div class="clearDiv entry-row">
    <%= this.Label(m => m.EndDate).Value("End Date:") %>
    <%= this.TextBox(m => m.EndDate).Class("text").ValidateForRequired().Value((Model.EndDate > DateTime.MinValue ? Model.EndDate : DateTime.Today.AddYears(1)).ToString("MM/dd/yyyy"))%>
  </div>
  <div class="clearDiv center">
    <a href="#" onclick="$('#startQuizForm').trigger('submit');" class="btn">Start</a>
  </div>
  <div class="clearDiv center">
    <%= Html.ActionLink("Cancel", "Index", null, new { @class = "btn"}) %>
  </div>
  <%= this.Hidden(m => m.QuizId).Value(Model.QuizId) %>
  <%= this.Hidden(m => m.QuizDefinitionId).Value(Model.QuizDefinitionId) %>
  </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageHeader" runat="server">
  Start a Quiz
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Scripts" runat="server">
  <script type="text/javascript">
    $(document).ready(function () {
      $("#StartDate").datepicker();
      $("#EndDate").datepicker();
    });
  </script>
</asp:Content>
